﻿using System;
using System.Collections.Generic;
using System.Data.Entity.ModelConfiguration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using PortalWeb.Core.Entity;

namespace PortalWeb.Dao.Mapping
{
    public class ApplicationRoleMap : EntityTypeConfiguration<ApplicationRole>
    {
        public ApplicationRoleMap()
        {
            // Relationships
            this.HasRequired(t => t.RoleGroup)
                .WithMany(t => t.Roles)
                .HasForeignKey(d => d.GroupId);
        }
    }
}
